package com.spzx.cart.api;

import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 购物车降级处理
 *
 * @author atguigu
 */
@Component
public class RemoteCartFallbackFactory implements FallbackFactory<RemoteCartService> {

    @Override
    public RemoteCartService create(Throwable throwable) {
        throw new RuntimeException(throwable.getMessage());
    }
}